#TotalAllocated The total number of bytes dynamically allocated by your program.
#
#TotalFree The total number of free bytes available in the (current)
# address space for allocation by your program. If this number
# is exceeded, and enough virtual memory is available, more
# address space will be allocated from the OS; TotalAddrSpace
# will be incremented accordingly.
#FreeSmall Total bytes of small memory blocks which are not currently
# allocated by your program.
#FreeBig Total bytes of big memory blocks which are not currently
# allocated by your program. Large free blocks can be
# created by coalescing smaller, contiguous, free blocks
# or by freeing a large dynamic allocation. (The exact
# size of the blocks is immaterial)
#Unused Total bytes which have never been allocated by your program.
# Note: Unused + FreeBig + FreeSmall = TotalFree
# These three fields (Unused, FreeBig, and FreeSmall) refer
# to dynamic allocation by the user program.
#Overhead The total number of bytes required by the heap manager to
# manage all the blocks dynamically allocated by your program.
#HeapErrorCode Indicates the current status of the heap, as internally
# determined.
#Note: TotalAddrSpace, TotalUncommitted and TotalCommitted refer to OS memory used by the program, where as TotalAllocated and TotalFree refer to the heap memory used within the program by dynamic allocations. Therefore, to monitor dynamic memory used in your program use TotalAllocated and TotalFree.
class HeapStatus(quarkpy.dlgclasses.placepersistent_dialogbox):
#
# dialog layout
#
endcolor = AQUA
size = (250,120)
dfsep = 0.50
flags = FWF_KEEPFOCUS
dlgdef = """
{
Style = "9"
Caption = "Heap Status Dialog"
TotalAllocated: =
{
Txt = "&"
Typ = "ESR"
Hint = "Total Bytes Allocated by the Program"
}
ChangeAllocated: =
{
Txt = "&"
Typ = "ESR"
Hint = "Change in Total Bytes Allocated by the Program"
}
sep: = { Typ="S" Txt=" " }
cancel:py = {Txt="" }
}
"""
#
# __init__ initialize the object
#
def __init__(self, form, editor, src):
#
# General initialization of some local values
#
self.editor = editor
#
# heapstatus object passed as parameter used directly to load